{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "782f7d1a",
   "metadata": {},
   "outputs": [],
   "source": [
    "#import numpy  #直接导入\n",
    "import numpy as np    #写一个小写的名字\n",
    "#from numpy import random  #导入特定模块\n",
    "#from numpy import*  #导入所有函数（不推荐）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "dda91ed9",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.23699132, 0.61274712, 0.57606687, 0.10999236, 0.94486579,\n",
       "        0.66441537, 0.11340378, 0.97555225],\n",
       "       [0.24675965, 0.67576893, 0.50201802, 0.89340106, 0.89507702,\n",
       "        0.38942158, 0.11598972, 0.81975157],\n",
       "       [0.13579483, 0.44060749, 0.52611795, 0.42188457, 0.86718687,\n",
       "        0.80831739, 0.13249785, 0.07457154],\n",
       "       [0.08580131, 0.4472677 , 0.45416687, 0.87572461, 0.11110301,\n",
       "        0.09749162, 0.8265574 , 0.22420123],\n",
       "       [0.51479549, 0.40195129, 0.61402073, 0.34156751, 0.71073881,\n",
       "        0.77825165, 0.18971172, 0.82139667],\n",
       "       [0.01290365, 0.10734532, 0.84003701, 0.55794425, 0.18476863,\n",
       "        0.24058049, 0.92930117, 0.78788677],\n",
       "       [0.58715439, 0.55069277, 0.10962344, 0.15113713, 0.42144373,\n",
       "        0.40074367, 0.93120034, 0.52323385],\n",
       "       [0.35894273, 0.71671244, 0.39850124, 0.3234692 , 0.67334234,\n",
       "        0.61108163, 0.68034083, 0.76040401]])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.random((8,8))\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd5d0e87",
   "metadata": {},
   "source": [
    "数组   （只可容纳一种数据格式）有一维数组，二维，三维，多维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "27ee23db",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([1,2,3,4])       #array将列表转换为数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "98ea7ed4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 0, 1])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([1,2,3,False,True])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "9bf5eacd",
   "metadata": {},
   "outputs": [],
   "source": [
    "#一维数组\n",
    "arr1=np.array([1,2,3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "74802fbc",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arrl.ndim   #查看维度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "f0fbadfc",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3,)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arrl.shape   #查看形状"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "8f2123c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [1, 2, 6]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#二维数组\n",
    "arr2=np.array([[1,2,3],[1,2,6]])\n",
    "arr2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "ee51ad93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr2.size   #数组里有多少个元素"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8d6f82c6",
   "metadata": {},
   "source": [
    "数组的构建"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9aa8c8d9",
   "metadata": {},
   "source": [
    "规律数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "82f9ffe9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2, 3, 4, 5, 6, 7])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.arange(2,8,1)#start,stop,step"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "363b224d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2. , 2.8, 3.6, 4.4, 5.2, 6. , 6.8, 7.6, 8.4, 9.2])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linspace(2,10,num=10,endpoint=False)   #将整个数做一个均分(linspace)    False 不包含10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "dc18e70a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 2.        ,  2.88888889,  3.77777778,  4.66666667,  5.55555556,\n",
       "        6.44444444,  7.33333333,  8.22222222,  9.11111111, 10.        ])"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linspace(2,10,num=10,endpoint=True)     #True包含10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "483ce1c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  4.,   8.,  16.,  32.,  64., 128., 256., 512.])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logspace(2,9,8,base=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "c37f8b3e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  4.,   8.,  16.,  32.,  64., 128., 256., 512.])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "2**np.linspace(2,9,8)   #上一行相当于这一行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "112f5e1e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.e+02, 1.e+03, 1.e+04, 1.e+05, 1.e+06, 1.e+07, 1.e+08, 1.e+09])"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logspace(2,9,8,base=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "d1ae9584",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.e+02, 1.e+03, 1.e+04, 1.e+05, 1.e+06, 1.e+07, 1.e+08, 1.e+09])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "10**np.linspace(2,9,8)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e42a2332",
   "metadata": {},
   "source": [
    "给维度生成数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "e755ffc9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0., 0.])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.zeros(2)  #一维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "c2dc70a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[[0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.]],\n",
       "\n",
       "        [[0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.],\n",
       "         [0., 0., 0., 0., 0.]]]])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.zeros((1,2,4,5))    #多维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "256aa7fb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[[6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6]],\n",
       "\n",
       "        [[6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6],\n",
       "         [6, 6, 6, 6, 6]]]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.full((1,2,4,5),6)    #要指定一下填充的数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "7f23757d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[[1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.]],\n",
       "\n",
       "        [[1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.]]]])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.ones((1,2,4,5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "37c436d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[[1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.]],\n",
       "\n",
       "        [[1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.],\n",
       "         [1., 1., 1., 1., 1.]]]])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.empty((1,2,4,5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "3f1bf636",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1703157584,        682,          0])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.empty_like(arr1)   #根据给定数组的形状，生成一个全是XX的数字"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "5c2bae33",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1., 0., 0., 0., 0., 0.],\n",
       "       [0., 1., 0., 0., 0., 0.],\n",
       "       [0., 0., 1., 0., 0., 0.],\n",
       "       [0., 0., 0., 1., 0., 0.],\n",
       "       [0., 0., 0., 0., 1., 0.],\n",
       "       [0., 0., 0., 0., 0., 1.]])"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.eye(6)     #对角矩阵"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eee6a7d4",
   "metadata": {},
   "source": [
    "随机数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "843e77c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.96766982, 0.07162952, 0.44526207],\n",
       "       [0.47622197, 0.54202373, 0.79800807]])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.random(2)    #0~1\n",
    "np.random.random((2,3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "f07eb2d4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[3, 9, 6],\n",
       "       [1, 5, 0]])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.randint(0,10,(2,3))    #给区间（左闭右开），给形状"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "3f4a21c0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5172978838465893"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(23)\n",
    "np.random.random()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80f1c8e9",
   "metadata": {},
   "source": [
    "一个文件一个"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3de464fe",
   "metadata": {},
   "source": [
    "切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "5503cfc9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[8, 9, 6, 8, 7, 9, 3],\n",
       "       [6, 1, 2, 5, 5, 0, 5],\n",
       "       [0, 9, 9, 3, 1, 7, 4],\n",
       "       [1, 1, 4, 6, 7, 3, 6],\n",
       "       [9, 2, 3, 0, 8, 6, 6],\n",
       "       [0, 5, 6, 0, 2, 0, 3],\n",
       "       [0, 6, 2, 2, 5, 7, 9]])"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3=np.random.randint(0,10,(7,7))    #7行7列\n",
    "arr3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "90e2809e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([8, 6, 0, 1, 9, 0, 0])"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[0,:]    #提取某一行，某一列    冒号代表整行或整列\n",
    "arr3[:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "1157d70c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 9, 9, 3, 1, 7, 4])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[2,:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "dd26cd94",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[6, 1, 2, 5, 5, 0, 5],\n",
       "       [1, 1, 4, 6, 7, 3, 6]])"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[1:4:2,:]   #多行多列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "1a48fa22",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[8, 9, 3],\n",
       "       [6, 1, 5],\n",
       "       [0, 9, 4],\n",
       "       [1, 1, 6],\n",
       "       [9, 2, 6],\n",
       "       [0, 5, 3],\n",
       "       [0, 6, 9]])"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[:,[0,1,6]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "a98d9f4f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0, 9, 4],\n",
       "       [9, 2, 6]])"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[2:6:2,[0,1,6]]   #行列索引交叉提取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "3191e38d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[2,4]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "45bc5b8e",
   "metadata": {},
   "source": [
    "波尔切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "72caf947",
   "metadata": {},
   "outputs": [],
   "source": [
    "bool_arr=arr3>5   #获得一个形状相同的布尔数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "34434a5f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([8, 9, 6, 8, 7, 9, 6, 9, 9, 7, 6, 7, 6, 9, 8, 6, 6, 6, 6, 7, 9])"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3[bool_arr]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "684eed25",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "21"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bool_arr.sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fdb8cd46",
   "metadata": {},
   "source": [
    "数组运算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "a9e8e196",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[64, 81, 36, 64, 49, 81,  9],\n",
       "       [36,  1,  4, 25, 25,  0, 25],\n",
       "       [ 0, 81, 81,  9,  1, 49, 16],\n",
       "       [ 1,  1, 16, 36, 49,  9, 36],\n",
       "       [81,  4,  9,  0, 64, 36, 36],\n",
       "       [ 0, 25, 36,  0,  4,  0,  9],\n",
       "       [ 0, 36,  4,  4, 25, 49, 81]])"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr3*arr3"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ceb3c34",
   "metadata": {},
   "source": [
    "广播规则"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "c3dc824c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4,)"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr4=np.array([1,2,3,4])\n",
    "arr4.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "ae582677",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[5, 9, 8, 7],\n",
       "       [1, 0, 5, 3],\n",
       "       [7, 6, 4, 0],\n",
       "       [2, 5, 1, 8]])"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr5=np.random.randint(0,10,(4,4))\n",
    "arr5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "328c4911",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 6, 11, 11, 11],\n",
       "       [ 2,  2,  8,  7],\n",
       "       [ 8,  8,  7,  4],\n",
       "       [ 3,  7,  4, 12]])"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr4+arr5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "a2de6b43",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 6, 10,  9,  8],\n",
       "       [ 2,  1,  6,  4],\n",
       "       [ 8,  7,  5,  1],\n",
       "       [ 3,  6,  2,  9]])"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr5+1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "d363542f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1],\n",
       "       [2],\n",
       "       [3],\n",
       "       [4]])"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr6=np.array([[1],[2],[3],[4]])\n",
    "arr6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "edaa5a33",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2, 3, 4, 5],\n",
       "       [3, 4, 5, 6],\n",
       "       [4, 5, 6, 7],\n",
       "       [5, 6, 7, 8]])"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr4+arr6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eabcfe1f",
   "metadata": {},
   "outputs": [],
   "source": [
    "arr77"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
